package web;


import spring.cloud.tasks.client.Client;
import spring.cloud.tasks.client.item_task_processor.Task;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class taskTypeList {
    public static void main(String[] args) throws Exception {
        HttpServletRequest request = null;
        String isManager = request.getParameter("workerManager");
        List<Task> taskList = Client.getZooKeeperItemTaskDataManager().getTaskList();
        String taskItemData = "";
        for (int i = 0; i < taskList.size(); i++) {
            taskItemData = "";
            String[] strs = taskList.get(i).getTaskItems();
            if (strs != null) {
                for (int j = 0; j < strs.length; j++) {
                    if (j > 0) {
                        taskItemData = taskItemData + ",";
                    }
                    taskItemData = taskItemData + strs[j];
                }
            }
            taskList.get(i).getTaskId();

            System.out.println(taskList.get(i).getHeartBeatRate() / 1000.0);
            System.out.println(taskList.get(i).getJudgeDeadInterval() / 1000.0);

            System.out.println(taskList.get(i).getFetchSize());
            System.out.println(taskList.get(i).getMaxExecuteSize());


            System.out.println(taskList.get(i).getRunCronExpressionString());


            System.out.println(taskList.get(i).getTaskParameter());
            System.out.println(taskItemData);
        }
    }
}